package org.headquarter.gui;

import org.boxlayout.gui.BoxLayoutEngine;
import org.boxlayout.gui.VisualElement;
import org.boxlayout.gui.layout.LayoutFactory;
import org.boxlayout.gui.type.ColorEnum;
import org.boxlayout.widget.Text;

public class WidgetDocument extends WidgetNode{

    VisualElement title;
    
    public WidgetDocument(BoxLayoutEngine ble) {
	super(ble);
	visual
	.setLayout(LayoutFactory.getInstance().getVerticalLayout())
	.setColor(ColorEnum.BLACK)
	.setPadding(0.02f)
	.setRounded(true)
	.setRoundRayon(0.1f)
	;
	
	
	title = ble.createElement()
	.setColor(ColorEnum.WHITE)
	.setRounded(true)
	.setRoundRayon(0.1f)
	.setPadding(0.03f)
	
	;
	
	Text page = new Text(ble);
	
	page.getVisual()
	.setColor(ColorEnum.RED)
	.setAlpha(0.4f)
	.setPreferedWidth(4.0f)
	.setPreferedHeight(2.0f)
	.setRounded(true)
	.setRoundRayon(0.1f)
	.setPadding(0.1f)
	//.setText("empty")
	;
	
	visual.add(title);
	
	
	visual.add(page.getVisual());
	
	
	
    }
    
    void updateVisual(){
	title.setText("Title");
    }


}
